package com.ldq.imooc.basics.dataOperation;

/**
 * @Author : 李道泉
 * @Description :
 * @Date : 2018/5/5 16:19
 * @Modified by :
 */
public class TransInfoAction {

    public static void main(String[] args) {

        try {
            transaction();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public static String trans() throws Exception {

        AccountDao accountDao = new AccountDao();
        TransInfoService transInfoService = new TransInfoService();

        Account from = null;
        Account to = null;

        from = accountDao.get(1);
        to = accountDao.get(2);

        return transInfoService.trans(from, to, (double) 10);
    }

    public static String transaction() throws Exception {

        AccountDao accountDao = new AccountDao();
        TransInfoService transInfoService = new TransInfoService();

        Account from = null;
        Account to = null;

        from = accountDao.get(1);
        to = accountDao.get(2);

        return transInfoService.trans(from, to, (double) 10);
    }
}
